<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" />
      <meta name="apple-mobile-web-app-capable" content="yes" />
      <meta name="format-detection" content="telephone=no" />
      <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  <script>
      Ontop = document.documentElement.scrollTop || document.body.scrollTop;
      // 当网页向下滑动 20px 出现"返回顶部" 按钮
      // window.onscroll = function () {
      //     // headerBackground()
      //     scrollFunction()
      // };

      // function scrollFunction() {
      //     if (document.body.scrollTop > 600 || document.documentElement.scrollTop > 600) {
      //         document.getElementById("btnTop").className = "to-top show";
      //     } else {
      //         document.getElementById("btnTop").className = "to-top";
      //     }
      // }

      // 点击按钮，返回顶部
      // function returnTop() {
      //
      //     let l = document.documentElement.scrollTop;
      //     console.log(l);
      //     let s = l / 600 * 25;  //路程/时间=s *25每隔25ms秒 动的路程
      //     let st = setInterval(function () {
      //         l -= s;
      //         if (l <= 0) {
      //             l = 0; //当l<=0时，设置l=0
      //             clearInterval(st);
      //         }
      //         document.documentElement.scrollTop = l;
      //     }, 25)
      //
      // }
      // function headerBackground(){
      //     let header = document.getElementById("headerPc");
      //     console.log(header)
      //     let classList = header.classList;
      //     if(document.body.scrollTop > 0 || document.documentElement.scrollTop > 0){
      //         classList.add("fixed")
      //     } else{
      //         classList.remove("fixed")
      //     }
      // }
  </script>
  </body>
</html>
